var payWork = require('../../utils/LCPayWorking.js');
var util = require('../../utils/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var ticketType = options.paytype;
    var orderN = options.orderN;
    var money = options.money;
    var fromType = options.resultType;

    var requestDic = options.requestDic;
    var payTime = util.getNowFormatDateHHMMSS();
    that.setData({
      ticketType: ticketType,
      orderNo: orderN,
      money: money,
      fromType: fromType,
      payTime: payTime,
    })
  },
  //查看订单
  lookOrder:function() {
    if (this.data.ticketType == 1) {//机票
      wx.redirectTo({
        url: '../myOrder/myOrder?type=' + 0,
      })
    } else {
      wx.redirectTo({
        url: '../myOrder/myOrder?type=' + 1,
      })
    }
  },
  //继续支付
  continuePay:function() {
    var payorderno = requestDic.OrderNo;
    var money = requestDic.Amount;
    var transactionType = requestDic.TransactionType;
    var subTransactionType = requestDic.SubTransactionType;
    payWork.getPayInfo(payorderno, money, transactionType, subTransactionType, that.data.ticketType, that.data.fromType);
  }

  
})